package com.gelsanalyzer.ui.swing;

import javax.swing.*;

import com.gelsanalyzer.business.control.*;

public class CourseEntryFrame extends JFrame {
    //private Handler handler;
    private CourseEntryPanel courseEntryPanel;

    public CourseEntryFrame(String title, String studentID, Handler handler) {
        courseEntryPanel = new CourseEntryPanel(studentID, handler);

        //this.handler = handler;
        this.setJMenuBar(new CourseMgmtMenuBar(handler));
        this.setContentPane(courseEntryPanel);
        this.setTitle(title);

        this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        this.addWindowListener(new CourseMgmtWindowListener(this));

    }

    public CourseEntryPanel getCourseEntryPanel() {
        return courseEntryPanel;
    }

    public CourseMgmtMenuBar getCourseMgmtMenuBar() {
        return (CourseMgmtMenuBar) this.getJMenuBar();
    }
}
